# Maintainer: Jelle van der Waa <jelle@vdwaa.nl>
# Contributor: Urs Wolfer <uwolfer @ fwo.ch>

pkgname=ttf-droid
pkgver=20121017
pkgrel=2
pkgdesc="General-purpose fonts released by Google as part of Android"
arch=('any')
license=('apache')
url="http://code.google.com/android/"
depends=('fontconfig' 'xorg-fonts-encodings' 'xorg-font-utils')
provides=('ttf-font')
install=$pkgname.install
source=('ftp://ftp.archlinux.org/other/community/ttf-droid/ttf-droid-20121017.tar.xz' 'serif-fontconfig.conf' 'sans-fontconfig.conf' 'sans-mono-fontconfig.conf' 'kufi-fontconfig.conf' )
md5sums=('0fa20eb63d7d05b23be955777bb52a5d')

package()
{
        # Install fonts
        cd $srcdir/google-droid-fonts-$pkgver
        install -d $pkgdir/usr/share/fonts/TTF/ 
        install -m644 *.ttf $pkgdir/usr/share/fonts/TTF/ 

        # Install fontconfig
        cd $srcdir
        install -d $pkgdir/etc/fonts/conf.avail/
        install -m644 sans-fontconfig.conf $pkgdir/etc/fonts/conf.avail/65-$pkgname-sans-fontconfig.conf
        install -m644 sans-mono-fontconfig.conf $pkgdir/etc/fonts/conf.avail/60-$pkgname-sans-mono-fontconfig.conf
        install -m644 serif-fontconfig.conf $pkgdir/etc/fonts/conf.avail/65-$pkgname-serif-fontconfig.conf
        install -m644 kufi-fontconfig.conf $pkgdir/etc/fonts/conf.avail/65-$pkgname-kufi-fontconfig.conf
}

md5sums=('0fa20eb63d7d05b23be955777bb52a5d'
         '7db18cf9df70ee41fbab444c80117ec6'
         '61f59063f84bd1331a91e21ebf86d43d'
         '7d7787d92e7b5089558a6d68c99813e3'
         '954a340fc7cb2846826a97d2b752501d')
